package kpython.backend.stackframe;

import java.util.LinkedList;
import java.util.List;

public class Frame {
	
	public Frame master = null;
	public Frame parent = null;	
	public List<Var> args = null;
	public int returnAddr = -1;
	
	public Frame() {		
		args = new LinkedList<Var>();
	}		
	
	public Frame(Frame parent) {
		this.parent = parent;
		args = new LinkedList<Var>();
	}	
	
	public void addVar(Var local) {		
		args.add(local);
	}
	
	public Var getLocal(int temp) {		
		return (Var)args.get(temp);
	}
}
